-- GENERATED SPELL FOR [Red Drakonid] --


function spell0_14264(pUnit, Event) --@Brood Power: Red,n/a--
pUnit:FullCastSpellOnTarget(22558,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14264', 5000, 1)
end

function spell1_14264(pUnit, Event) --@Summon Player,n/a--
pUnit:FullCastSpellOnTarget(20477,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14264', 591, 1)
end

function Sorts_14264(pUnit, Event)
local choix_sorts_14264 = math.random(0, 1)
if choix_sorts_14264 == 0 then
pUnit:RegisterEvent('spell0_14264', 1, 1)
end
if choix_sorts_14264 == 1 then
pUnit:RegisterEvent('spell1_14264', 1, 1)
end
end

function mob14264_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14264', math.random(1500, 3000), 1)
end

function mob14264_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14264_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14264_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14264, 1, 'mob14264_Action')
RegisterUnitEvent(14264, 2, 'mob14264_Leave')
RegisterUnitEvent(14264, 3, 'mob14264_Kill')
RegisterUnitEvent(14264, 4, 'mob14264_Die')
